package com.ruoyi.wareManagement.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wareManagement.mapper.InventoryOverviewMapper;
import com.ruoyi.wareManagement.domain.InventoryOverview;
import com.ruoyi.wareManagement.service.IInventoryOverviewService;

/**
 * 库存查询Service业务层处理
 * 
 * @author admin
 * @date 2024-06-28
 */
@Service
public class InventoryOverviewServiceImpl implements IInventoryOverviewService 
{
    @Autowired
    private InventoryOverviewMapper inventoryOverviewMapper;

    /**
     * 查询库存查询
     * 
     * @param inquiryId 库存查询主键
     * @return 库存查询
     */
    @Override
    public InventoryOverview selectInventoryOverviewByInquiryId(Long inquiryId)
    {
        return inventoryOverviewMapper.selectInventoryOverviewByInquiryId(inquiryId);
    }

    /**
     * 查询库存查询列表
     * 
     * @param inventoryOverview 库存查询
     * @return 库存查询
     */
    @Override
    public List<InventoryOverview> selectInventoryOverviewList(InventoryOverview inventoryOverview)
    {
        return inventoryOverviewMapper.selectInventoryOverviewList(inventoryOverview);
    }

    /**
     * 新增库存查询
     * 
     * @param inventoryOverview 库存查询
     * @return 结果
     */
    @Override
    public int insertInventoryOverview(InventoryOverview inventoryOverview)
    {
        inventoryOverview.setCreateTime(DateUtils.getNowDate());
        return inventoryOverviewMapper.insertInventoryOverview(inventoryOverview);
    }

    /**
     * 修改库存查询
     * 
     * @param inventoryOverview 库存查询
     * @return 结果
     */
    @Override
    public int updateInventoryOverview(InventoryOverview inventoryOverview)
    {
        return inventoryOverviewMapper.updateInventoryOverview(inventoryOverview);
    }

    /**
     * 批量删除库存查询
     * 
     * @param inquiryIds 需要删除的库存查询主键
     * @return 结果
     */
    @Override
    public int deleteInventoryOverviewByInquiryIds(Long[] inquiryIds)
    {
        return inventoryOverviewMapper.deleteInventoryOverviewByInquiryIds(inquiryIds);
    }

    /**
     * 删除库存查询信息
     * 
     * @param inquiryId 库存查询主键
     * @return 结果
     */
    @Override
    public int deleteInventoryOverviewByInquiryId(Long inquiryId)
    {
        return inventoryOverviewMapper.deleteInventoryOverviewByInquiryId(inquiryId);
    }

}
